package cn.com.utt.unms.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import cn.com.utt.unms.pojo.Template;
import cn.com.utt.unms.pojo.UserTemplate;

@Mapper
public interface TemplateMapper {
	
	@Select("select * from template where type=1 order by id desc")
	List<Template> loadTemplate();
	@Select("select * from user_template where user_id=#{userId} order by id desc")
	List<UserTemplate> queryUserTemplateByUserId(Long userId);
	@Select("select * from template where id=#{id}")
	Template queryTemplateById(Long id);

}
